<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + 	request.getServerPort() + request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
<meta charset="UTF-8">

<link href="jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>

<script type="text/javascript">

	//默认情况下取消和保存按钮是隐藏的
	var cancelAndSaveBtnDefault = true;
	
	$(function(){
		$("#remark").focus(function(){
			if(cancelAndSaveBtnDefault){
				//设置remarkDiv的高度为130px
				$("#remarkDiv").css("height","130px");
				//显示
				$("#cancelAndSaveBtn").show("2000");
				cancelAndSaveBtnDefault = false;
			}
		});
		
		$("#cancelBtn").click(function(){
			//显示
			$("#cancelAndSaveBtn").hide();
			//设置remarkDiv的高度为130px
			$("#remarkDiv").css("height","90px");
			cancelAndSaveBtnDefault = true;
		});
		
		$(".remarkDiv").mouseover(function(){
			$(this).children("div").children("div").show();
		});
		
		$(".remarkDiv").mouseout(function(){
			$(this).children("div").children("div").hide();
		});
		
		$(".myHref").mouseover(function(){
			$(this).children("span").css("color","red");
		});
		
		$(".myHref").mouseout(function(){
			$(this).children("span").css("color","#E6E6E6");
		});


		$("#remarkBody").on("mouseover",".remarkDiv",function(){
			$(this).children("div").children("div").show();
		})
		$("#remarkBody").on("mouseout",".remarkDiv",function(){
			$(this).children("div").children("div").hide();
		})

//页面加载完毕，获取出线索关联的市场活动信息
		showActivityList();



		$("#bundActivity").click(function () {
			$("#bundModal").modal("show")
			$("#aname").focus();
		})



//为关联市场活动中模态窗口的搜索框绑定键盘事件，通过触发回车，执行查询操作
		$("#aname").keydown(function (event) {

			if(event.keyCode==13){
				alert("展现 市场活动列表奥")

				//alert($.trim($("#aname").val()))

				$.ajax({
					url:"/crm/clue/getActivityByNameAndNotConnectClue.do",
					type:"get",
					data:{
						"aname":$.trim($("#aname").val()),
						"clueId":"${requestScope.clue.id}"
					},
					dataType:"json",
					success:function (resp) {

					/*
						resp
								[{市场活动1},{市场活动2},{市场活动3}]
						*/
					var html="";

					$.each(resp,function (i,n) {
							html+='<tr>';
							html+='<td><input type="checkbox" name="xz" value="'+n.id+'"/></td>';
							html+='<td>'+n.name+'</td>';
							html+='<td>'+n.startDate+'</td>';
							html+='<td>'+n.endDate+'</td>';
							html+='<td>'+n.owner+'</td>';
							html+='</tr>';
					})

						$("#activitySearchBody").html(html)

					}

				})


				//展现完列表后，将模态窗口默认的回车行为禁止
				return false;
			}

		})

//给关联市场活动的全选复选框绑定事件，【实现复选框全选操作】
		$("#qx").click(function () {
			$("input[name=xz]").prop("checked",this.checked)
		})

		$("#activitySearchBody").on("click",$("input[name=xz]"),function () {
			$("#qx").prop("checked",($("input[name=xz]:checked").length==$("input[name=xz]").length))
		})

		
//给关联按钮绑定事件，执行关联表的添加操作，就是将线索和市场活动关联起来   【批量添加】
		$("#connectBtn").click(function () {
			//alert("事件绑定成功")
			var $xz=$("input[name=xz]:checked")
			if($xz.length==0){
				alert("请选择需要和线索关联的市场活动")
			}else {
				//程序走到这里说明至少选择了一条市场活动   我们现在执行【批量添加】操作
//我们的请求url地址应该是  workbench/clue/connect.do?clueId=xx&activityId=xx&activityId=xx&activityId=xx
				var parameter="clueId=${requestScope.clue.id}&";

				for(var i=0;i<$xz.length;i++){
					parameter+="activityId="+$($xz[i]).val()

					if(i<$xz.length-1){
						parameter+="&"
					}
				}

				$.ajax({
					url:"/crm/clue/connect.do",
					type:"post",
					data:parameter,

					dataType:"json",
					success:function (resp) {
						/*
						resp
							{"success",true/fales}
						 */

						if(resp.success){
							alert("市场活动关联成功")
							//刷新市场活动关联列表
							showActivityList();

							//清楚搜索框中的信息
							$("#aname").val("");
							//将复选框中的√清除
							$("input[name=xz]").prop("checked",false)
							$("#qx").prop("checked",false)
							//将查询出来可以关联的市场活动列表清除
							$("#activitySearchBody").html("");

							//关闭关联市场活动模态窗口
							$("#bundModal").modal("hide")

						}

					}
				})


			}

		})



		showClueRemarks()



//给更新按钮绑定事件，执行线索备注的修改操作
		$("#updateClueRemarkBtn").click(function () {
			//alert("事件绑定成功啦")
			var id=$("#updateClueRemark-id").val()

			//alert("需要修改的线索备注的id"+id)

			var noteContent=$("#clue-noteContent").val()

			$.ajax({
				url:"/crm/clue/updateClueRemark.do",
				type:"post",
				data:{
					"noteContent":noteContent,
					"id":id
				},
				dataType:"json",
				success:function (resp) {
		/*
		* 	resp:
		* 		{"success",true/false}
		*
		* */
				if(resp.success){
					alert("修改线索备注成功")
					showClueRemarks()
					$("#editRemarkModal").modal("hide")

				}else{
					alert("修改线索备注失败")
				}

				}
			})

		})

//给保存按钮绑定事件，执行新增线索备注的操作
		$("#saveClueRemarkBtn").click(function () {
			//alert("事件绑定成立拉")
			var noteContent=$("#remark").val()
			var clueId="${requestScope.clue.id}"

			$.ajax({
				url:"clue/saveClueRemark.do",
				type:"post",
				data:{
					"noteContent":noteContent,
					"clueId":clueId
				},
				dataType:"json",
				success:function (resp) {
			/*
				resp:
					{true/false}

			*/

					if(resp){
						alert("新增线索备注成功")
						showClueRemarks()
						$("#remark").val("")
					}else{
						alert("新增线索备注失败")
					}
				}
			})
		})


//给编辑按钮绑定事件，用于铺垫修改线索的模态窗口
		$("#editClueBtn").click(function () {
			//alert("事件绑定成功")
			var clueId="${requestScope.clue.id}"

			$("#editClueModal").modal("show")

			$.ajax({
				url:"clue/editClue.do",
				type:"post",
				data:{
					"id":clueId
				},
				dataType:"json",
				success:function(resp){
					//alert("回调函数执行")
			/*
				resp:
					["userList":{用户1},{用户2},"clue":{线索}]
			*/
				var html="";//用于铺垫所有者下拉框
				$.each(resp.userList,function (i,n) {
					html+='<option value="'+n.id+'">'+n.name+'</ooption>'
				})

					$("#edit-owner").html(html)//铺垫所有者下拉框



					//铺垫单条
					$("#edit-owner").val(resp.clue.owner)
					$("#edit-company").val(resp.clue.company)
					$("#edit-fullname").val(resp.clue.fullname)
					$("#edit-job").val(resp.clue.job)
					$("#edit-email").val(resp.clue.email)
					$("#edit-phone").val(resp.clue.phone)
					$("#edit-website").val(resp.clue.website)
					$("#edit-mphone").val(resp.clue.mphone)
					$("#edit-describe").val(resp.clue.description)
					$("#edit-contactSummary").val(resp.clue.contactSummary)
					$("#edit-nextContactTime").val(resp.clue.nextContactTime	)
					$("#edit-mphone").val(resp.clue.mphone)
					$("#edit-address").val(resp.clue.address)
					$("#edit-call").val(resp.clue.appellation)
					$("#edit-source").val(resp.clue.source)
					$("#edit-state").val(resp.clue.state)


				}

			})




		})

//给更新按钮绑定事件，用于执行修改线索的操作
		$("#updateClueBtn").click(function () {
			//alert("事件绑定成功")
			var clueId="${requestScope.clue.id}"

			$.ajax({
				url:"clue/editClueInDetail.do",
				type:"post",
				data:{
					"id":clueId,
					"company":$.trim($("#edit-company").val()),
					"fullname":$.trim($("#edit-fullname").val()),
					"appellation":$.trim($("#edit-call").val()),
					"owner":$.trim($("#edit-owner").val()),
					"job":$.trim($("#edit-job").val()),
					"email":$.trim($("#edit-email").val()),
					"phone":$.trim($("#edit-phone").val()),
					"website":$.trim($("#edit-website").val()),
					"mphone":$.trim($("#edit-mphone").val()),
					"state":$.trim($("#edit-state").val()),
					"source":$.trim($("#edit-source").val()),
					"description":$.trim($("#edit-describe").val()),
					"contactSummary":$.trim($("#edit-contactSummary").val()),
					"nextContactTime":$.trim($("#edit-nextContactTime").val()),
					"address":$.trim($("#edit-address").val())
				},
				dataType:"json",
				success:function(resp){
		/*
			resp:
				{true/falese}
		*/
			if(resp){
				alert("修改线索成功")
				$("#editClueModal").modal("hide")
				window.location.href="workbench/clue/index.jsp"

			}else {
				alert("修改线索失败")
			}

				}

			})

		})


//给删除1999按钮绑定事件，执行在详细页中删除线索的操作
		$("#deleteClueInDetailBtn").click(function () {
			//alert("事件绑定成功")
			var clueId="${requestScope.clue.id}"

			$.ajax({
				url:"clue/deleteClueInDetail.do",
				type:"post",
				data:{
					"id":clueId

				},
				dataType:"json",
				success:function (resp) {
		/*
			resp:
				{true/false}
		*/
				if(resp){
					alert("在详细页删除线索成功")
					window.location.href="workbench/clue/index.jsp"
				}else {
					alert("在详细页删除线索失败")
				}

				}
			})

		})

	});
//页面加载完毕分隔线===================================================================================


//修改线索备注方法,用于铺垫修改线索备注的模态窗口
	function editClueRemark(id) {
		//alert("修改线索备注方法执行"+id)
		$("#updateClueRemark-id").val(id)
		$.ajax({
			url:"clue/editClueRemark.do",
			type:"post",
			data:{
				"id":id
			},
			dataType:"json",
			success:function (resp) {
		/*
			resp:
				{"clueRemark",{线索备注}}
		 */

				$("#clue-noteContent").val(resp.clueRemark.noteContent)

			}

		})


		$("#editRemarkModal").modal("show")

	}




//删除线索备注方法，执行删除线索备注的操作
		function deleteClueRemark(id) {
			//alert("删除线索备注方法执行"+id)
			var clueRemarkId=id
			if(confirm("确定要删除所选择的线索备注吗?")){
				$.ajax({
					url:"clue/deleteClueRemark.do",
					type:"post",
					data:{
						"id":clueRemarkId
					},
					dataType:"json",
					success:function (resp) {
			/*
				resp
					:{true/false}
			 */
					if(resp){
						alert("删除线索备注成功")
						showClueRemarks()
					}else{
						alert("删除线索备注失败")
					}

					}
				})
			}
		}


//刷新线索备注方法
		function showClueRemarks() {
			//alert("方法声明成功")
			var clueId="${requestScope.clue.id}"
			//alert(clueId)
			$.ajax({
				url:"/crm/clue/clueRemark.do",
				type:"get",
				data:{
					id:clueId
				},
				dataType:"json",
				success:function (resp) {
			/*
				resp:
					{"clueRemark",{备注1},{备注2},{备注3}}

			 */
				//alert("开始显示备注列表")
				var html="";

				$.each(resp.clueRemarks,function (i,n) {
					html+=' <div class="remarkDiv" style="height: 60px;">';
					html+=' <img title="zhangsan" src="image/user-thumbnail.png" style="width: 30px; height:30px;">';
					html+=' <div style="position: relative; top: -40px; left: 40px;" >';
					html+=' <h5>'+n.noteContent+'</h5>';
					html+=' <font color="gray">线索</font> <font color="gray">-</font> <b>${requestScope.clue.fullname}${requestScope.clue.appellation}</b> <small style="color: gray;"> '+(n.editFlag==0?n.createTime:n.editTime)+' 由'+(n.editFlag==0?n.createBy:n.editBy)+'</small>';
					html+=' <div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">';
					html+=' <a class="myHref" href="javascript:void(0);" onclick="editClueRemark(\''+n.id+'\')"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #FF0000;"></span></a>';
					html+=' &nbsp;&nbsp;&nbsp;&nbsp;';
					html+=' <a class="myHref" href="javascript:void(0);" onclick="deleteClueRemark(\''+n.id+'\')"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #FF0000;"></span></a>';
					html+=' </div>';
					html+=' </div>';
					html+=' </div>';

				})
					$("#clueRemarkList").html(html)
				}




			})

		}



//刷新线索关联的市场活动列表
	function showActivityList() {
		$.ajax({
			url:"/crm/clue/showActivityListByClueId.do",
			type:"get",
			data:{
				"ClueId":"${requestScope.clue.id}"
			},
			dataType:"json",
			success:function (resp) {
				/*
				resp
					[{市场活动1},{市场活动2},{市场活动3}]
				 */
				var html="";
				$.each(resp,function (i,n) {
					html+='<tr>';
					html+='<td>'+n.name+'</td>';
					html+='<td>'+n.startDate+'</td>';
					html+='<td>'+n.endDate+'</td>';
					html+='<td>'+n.owner+'</td>';
					html+='<td><a href="javascript:void(0);" onclick="unbund(\''+n.id+'\')" style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>';
					html+='</tr>';
				})
				$("#activityList").html(html)
			}
		})
	}


//解除关联方法
	function unbund(id) {
		/*
		这里我们想要关联关系表的id，这样方便我们解除关联
		 */
		if (confirm("确定要解除关联吗？")){
			$.ajax({
				url:"clue/unBundClueWithActivity.do",
				type: "post",
				data:{
					"id":id
				},
				dataType:"json",
				success:function (resp) {
					/*
                    resp
                        {"success",true/false}
                     */
					if(resp.success){
						alert("解除关联成功")
						showActivityList()
					}else {
						alert("解除关联失败")
					}

				}
			})
		}


	}

</script>

</head>
<body>

	<!-- 关联市场活动的模态窗口 -->
	<div class="modal fade" id="bundModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 80%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title">关联市场活动</h4>
				</div>
				<div class="modal-body">
					<div class="btn-group" style="position: relative; top: 18%; left: 8px;">
						<form class="form-inline" role="form">
						  <div class="form-group has-feedback">
						    <input type="text" class="form-control" id="aname" style="width: 300px;" placeholder="请输入市场活动名称，支持模糊查询">
						    <span class="glyphicon glyphicon-search form-control-feedback"></span>
						  </div>
						</form>
					</div>
					<table id="activityTable" class="table table-hover" style="width: 900px; position: relative;top: 10px;">
						<thead>
							<tr style="color: #B3B3B3;">
								<td><input type="checkbox" id="qx"/></td>
								<td>名称</td>
								<td>开始日期</td>
								<td>结束日期</td>
								<td>所有者</td>
								<td></td>
							</tr>
						</thead>
						<tbody id="activitySearchBody">
							<%--<tr>
								<td><input type="checkbox"/></td>
								<td>发传单asas</td>
								<td>2020-10-10</td>
								<td>2020-10-20</td>
								<td>zhangsan</td>
							</tr>
							<tr>
								<td><input type="checkbox"/></td>
								<td>发传单</td>
								<td>2020-10-10</td>
								<td>2020-10-20</td>
								<td>zhangsan</td>
							</tr>--%>
						</tbody>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" id="connectBtn">关联asa</button>
				</div>
			</div>
		</div>
	</div>

    <!-- 修改线索的模态窗口 -->
    <div class="modal fade" id="editClueModal" role="dialog">
        <div class="modal-dialog" role="document" style="width: 90%;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">×</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">修改线索</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form">

                        <div class="form-group">
                            <label for="edit-clueOwner" class="col-sm-2 control-label">所有者<span style="font-size: 15px; color: red;">*</span></label>
                            <div class="col-sm-10" style="width: 300px;">
                                <select class="form-control" id="edit-owner">

                                    <%--<option>zhangsan</option>
                                    <option>lisi</option>
                                    <option>wangwu</option>--%>
                                </select>
                            </div>
                            <label for="edit-company" class="col-sm-2 control-label">公司<span style="font-size: 15px; color: red;">*</span></label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-company" value="动力节点飒飒">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-call" class="col-sm-2 control-label">称呼</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <select class="form-control" id="edit-call">
                                    <option></option>
                                    <c:forEach items="${applicationScope.appellation}" var="a">
								<option value="${a.value}">${a.text}</option>
									</c:forEach>
                                </select>
                            </div>
                            <label for="edit-surname" class="col-sm-2 control-label">姓名559<span style="font-size: 15px; color: red;">*</span></label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-fullname">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-job" class="col-sm-2 control-label">职位</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-job" value="CTO">
                            </div>
                            <label for="edit-email" class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-email" value="lisi@bjpowernode.com">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-phone" class="col-sm-2 control-label">公司座机</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-phone" value="010-84846003">
                            </div>
                            <label for="edit-website" class="col-sm-2 control-label">公司网站</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-website" value="http://www.bjpowernode.com">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-mphone" class="col-sm-2 control-label">手机</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <input type="text" class="form-control" id="edit-mphone" value="12345678901">
                            </div>
                            <label for="edit-status" class="col-sm-2 control-label">线索状态</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <select class="form-control" id="edit-state">
                                    <option></option>
									<c:forEach items="${applicationScope.clueState}" var="clueState">
									<option value="${clueState.value}">${clueState.text}</option>
									</c:forEach>

                                    <%--<option>试图联系</option>
                                    <option>将来联系</option>
                                    <option selected>已联系</option>
                                    <option>虚假线索</option>
                                    <option>丢失线索</option>
                                    <option>未联系</option>
                                    <option>需要条件</option>--%>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-source" class="col-sm-2 control-label">线索来源</label>
                            <div class="col-sm-10" style="width: 300px;">
                                <select class="form-control" id="edit-source">s
                                    <option></option>
									<c:forEach items="${applicationScope.source}" var="s">
										<option value="${s.value}">${s.text}</option>
									</c:forEach>
                                    <%--<option selected>广告</option>
                                    <option>推销电话</option>
                                    <option>员工介绍</option>
                                    <option>外部介绍</option>
                                    <option>在线商场</option>
                                    <option>合作伙伴</option>
                                    <option>公开媒介</option>
                                    <option>销售邮件</option>
                                    <option>合作伙伴研讨会</option>
                                    <option>内部研讨会</option>
                                    <option>交易会</option>
                                    <option>web下载</option>
                                    <option>web调研</option>
                                    <option>聊天</option>--%>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="edit-describe" class="col-sm-2 control-label">描述</label>
                            <div class="col-sm-10" style="width: 81%;">
                                <textarea class="form-control" rows="3" id="edit-describe">这是一条线索的描述信息</textarea>
                            </div>
                        </div>

                        <div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative;"></div>

                        <div style="position: relative;top: 15px;">
                            <div class="form-group">
                                <label for="edit-contactSummary" class="col-sm-2 control-label">联系纪要</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="3" id="edit-contactSummary">这个线索即将被转换</textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="edit-nextContactTime" class="col-sm-2 control-label">下次联系时间</label>
                                <div class="col-sm-10" style="width: 300px;">
                                    <input type="text" class="form-control" id="edit-nextContactTime" value="2017-05-01">
                                </div>
                            </div>
                        </div>

                        <div style="height: 1px; width: 103%; background-color: #D5D5D5; left: -13px; position: relative; top : 10px;"></div>

                        <div style="position: relative;top: 20px;">
                            <div class="form-group">
                                <label for="edit-address" class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-10" style="width: 81%;">
                                    <textarea class="form-control" rows="1" id="edit-address">北京大兴区大族企业湾</textarea>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="updateClueBtn">更新44</button>
                </div>
            </div>
        </div>
    </div>

	<!-- 返回按钮 -->
	<div style="position: relative; top: 35px; left: 10px;">
		<a href="javascript:void(0);" onclick="window.history.back();"><span class="glyphicon glyphicon-arrow-left" style="font-size: 20px; color: #DDDDDD"></span></a>
	</div>
	
	<!-- 大标题 -->
	<div style="position: relative; left: 40px; top: -30px;">
		<div class="page-header">
			<h3>${requestScope.clue.fullname}${requestScope.clue.appellation} <small>${requestScope.clue.company}</small></h3>
		</div>
		<div style="position: relative; height: 50px; width: 500px;  top: -72px; left: 700px;">
			<button type="button" class="btn btn-default" onclick="window.location.href='workbench/clue/convert.jsp?id=${requestScope.clue.id}&fullname=${requestScope.clue.fullname}&appellation=${requestScope.clue.appellation}&owner=${requestScope.clue.owner}&company=${requestScope.clue.company}';"><span class="glyphicon glyphicon-retweet"></span> 转换</button>
			<button type="button" class="btn btn-default" data-toggle="modal" id="editClueBtn" ><span class="glyphicon glyphicon-edit"></span> 编辑3306</button>
			<button type="button" class="btn btn-danger" id="deleteClueInDetailBtn"><span class="glyphicon glyphicon-minus"></span> 删除1999</button>
		</div>
	</div>
	
	<!-- 详细信息 -->
	<div style="position: relative; top: -70px;">
		<div style="position: relative; left: 40px; height: 30px;">
			<div style="width: 300px; color: gray;">名称</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.fullname}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">所有者</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.owner}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 10px;">
			<div style="width: 300px; color: gray;">公司</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.company}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">职位</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.job}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 20px;">
			<div style="width: 300px; color: gray;">邮箱</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.email}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">公司座机</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.phone}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 30px;">
			<div style="width: 300px; color: gray;">公司网站</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.website}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">手机</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.mphone}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 40px;">
			<div style="width: 300px; color: gray;">线索状态</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.state}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">线索来源</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.source}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 50px;">
			<div style="width: 300px; color: gray;">创建者</div>
			<div style="width: 500px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.createBy}&nbsp;&nbsp;</b><small style="font-size: 10px; color: gray;">${requestScope.clue.createTime}</small></div>
			<div style="height: 1px; width: 550px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 60px;">
			<div style="width: 300px; color: gray;">修改者</div>
			<div style="width: 500px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.editBy}&nbsp;&nbsp;</b><small style="font-size: 10px; color: gray;">${requestScope.clue.editTime}</small></div>
			<div style="height: 1px; width: 550px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 70px;">
			<div style="width: 300px; color: gray;">描述</div>
			<div style="width: 630px;position: relative; left: 200px; top: -20px;">
				<b>
					${requestScope.clue.description}
				</b>
			</div>
			<div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 80px;">
			<div style="width: 300px; color: gray;">联系纪要</div>
			<div style="width: 630px;position: relative; left: 200px; top: -20px;">
				<b>
					${requestScope.clue.contactSummary}
				</b>
			</div>
			<div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 90px;">
			<div style="width: 300px; color: gray;">下次联系时间</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.nextContactTime}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -20px; "></div>
		</div>
        <div style="position: relative; left: 40px; height: 30px; top: 100px;">
            <div style="width: 300px; color: gray;">详细地址</div>
            <div style="width: 630px;position: relative; left: 200px; top: -20px;">
                <b>
					${requestScope.clue.address}
                </b>
            </div>
            <div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
        </div>
	</div>

	<!--修改线索备注模态窗口-->
	<div class="modal fade" id="editRemarkModal" role="dialog">
		<%-- 备注的id --%>
		<input type="hidden" id="clueRemarkId">
		<div class="modal-dialog" role="document" style="width: 40%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">修改备注</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">
						<input type="hidden" id="updateClueRemark-id">
						<div class="form-group">
							<label for="edit-describe" class="col-sm-2 control-label">内容</label>
							<div class="col-sm-10" style="width: 81%;">
								<textarea class="form-control" rows="3" id="clue-noteContent">1110.0</textarea>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button type="button" class="btn btn-primary" id="updateClueRemarkBtn">更新</button>
				</div>
			</div>
		</div>
	</div>
	
	<!-- 备注 -->
	<div id="remarkBody" style="position: relative; top: 40px; left: 40px;">
		<div class="page-header">
			<h4>备注</h4>
		</div>

		<div id="clueRemarkList">

		</div>

		<!-- 备注1 -->
		<%--<div class="remarkDiv" style="height: 60px;">
			<img title="zhangsan" src="image/user-thumbnail.png" style="width: 30px; height:30px;">
			<div style="position: relative; top: -40px; left: 40px;" >
				<h5>哎呦！</h5>
				<font color="gray">线索</font> <font color="gray">-</font> <b>李四先生-动力节点</b> <small style="color: gray;"> 2017-01-22 10:10:10 由zhangsan</small>
				<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #E6E6E6;"></span></a>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>
				</div>
			</div>
		</div>--%>
		
		<!-- 备注2 -->
		<%--<div class="remarkDiv" style="height: 60px;">
			<img title="zhangsan" src="image/user-thumbnail.png" style="width: 30px; height:30px;">
			<div style="position: relative; top: -40px; left: 40px;" >
				<h5>呵呵！</h5>
				<font color="gray">线索</font> <font color="gray">-</font> <b>李四先生-动力节点</b> <small style="color: gray;"> 2017-01-22 10:20:10 由zhangsan</small>
				<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #E6E6E6;"></span></a>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>
				</div>
			</div>
		</div>--%>
		
		<div id="remarkDiv" style="background-color: #E6E6E6; width: 870px; height: 90px;">
			<form role="form" style="position: relative;top: 10px; left: 10px;">
				<textarea id="remark" class="form-control" style="width: 850px; resize : none;" rows="2"  placeholder="添加备注..."></textarea>
				<p id="cancelAndSaveBtn" style="position: relative;left: 737px; top: 10px; display: none;">
					<button id="cancelBtn" type="button" class="btn btn-default">取消</button>
					<button type="button" class="btn btn-primary" id="saveClueRemarkBtn">保存</button>
				</p>
			</form>
		</div>
	</div>
	
	<!-- 市场活动 -->
	<div>
		<div style="position: relative; top: 60px; left: 40px;">
			<div class="page-header">
				<h4>市场活动</h4>
			</div>
			<div style="position: relative;top: 0px;">
				<table class="table table-hover" style="width: 900px;">
					<thead>
						<tr style="color: #B3B3B3;">
							<td>名称</td>
							<td>开始日期</td>
							<td>结束日期</td>
							<td>所有者</td>
							<td></td>
						</tr>
					</thead>
					<tbody id="activityList">
						<%--<tr>
							<td>发传单</td>
							<td>2020-10-10</td>
							<td>2020-10-20</td>
							<td>zhangsan</td>
							<td><a href="javascript:void(0);"  style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>
						</tr>
						<tr>
							<td>发传单</td>
							<td>2020-10-10</td>
							<td>2020-10-20</td>
							<td>zhangsan</td>
							<td><a href="javascript:void(0);"  style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>
						</tr>--%>
					</tbody>
				</table>
			</div>
			
			<div>
				<a href="javascript:void(0);" data-toggle="modal" id="bundActivity" style="text-decoration: none;"><span class="glyphicon glyphicon-plus"></span>关联市场活动</a>
			</div>
		</div>
	</div>
	
	
	<div style="height: 200px;"></div>
</body>
</html>